package com.spr.controller.push;

import com.spr.request.SprDevicePaintingCompleteRecord;
import com.spr.request.SprDevicePaintingRecord;
import com.spr.service.SprDevicePushService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.CompletableFuture;

@RestController
@RequestMapping("/sprDevicePush")
@Slf4j
@Api(tags = "设备推送-控制类")
public class SprDevicePushController {

    @Autowired
    private SprDevicePushService sprDevicePushService;

    @ApiOperation(value = "推送喷漆完工记录(作废)")
    @PostMapping("pushPaintingCompleteRecord")
    public ResponseEntity  devicePaintingCompleteRecord(@RequestBody SprDevicePaintingCompleteRecord sprDevicePaintingCompleteRecord){
     sprDevicePushService.devicePaintingCompleteRecord(sprDevicePaintingCompleteRecord);
        return ResponseEntity.ok().build();
    }


    @ApiOperation(value = "推送喷漆记录(作废)")
    @PostMapping("pushPaintingRecord")
    public ResponseEntity  devicePaintingRecord(@RequestBody SprDevicePaintingRecord sprDevicePaintingRecord){
        sprDevicePushService.devicePaintingRecord(sprDevicePaintingRecord);
        return ResponseEntity.ok().build();
    }



}
